//
//  NearResultCell.m
//  CarLife
//
//  Created by yu on 2017/11/14.
//  Copyright © 2017年 jpas. All rights reserved.
//

#import "NearResultCell.h"
#import "SearchLocation.h"
#import "Utility.h"

@implementation NearResultCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)updateAttributedTextWithTip:(SearchLocation *)location keyword:(NSString *)keyword {

    NSAttributedString *attrString = [Utility attributeStringWithContent:location.name keyword:keyword];
    self.titleLabel.attributedText = attrString;
    
    self.subtitleLabel.text = NSStringFormat(@"%@-%@",location.district,location.address);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
